package com.goktech.olala.server.dao.goods;

import com.goktech.olala.server.pojo.goods.GoodsBrand;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsBrandMapper {
    int deleteByPrimaryKey(Short brandId);

    int insert(GoodsBrand record);

    GoodsBrand selectByPrimaryKey(Short brandId);

    List<GoodsBrand> selectAll();

    int updateByPrimaryKey(GoodsBrand record);

    /**
     * 通过分类来查询对应的实力商家
     * @param categoryId
     * @return
     */
    List<GoodsBrand> selectByCategoryId(@Param("categoryId") Integer categoryId);

    /**
     * 传入搜索字段，通过名字与描述查询
     * @param name
     * @return
     */
    List<GoodsBrand> selectByName(@Param("name") String name);
}